From 040942265ef4b82827547ac26e5fc04895ce0b87 Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Fri, 9 Oct 2015 16:01:13 +0000 Subject: [PATCH] Fix the usage of CFG_xxxABLE_OPTIMIZE variables in Makefiles Until now, there was a CFG_DISABLE_OPTIMIZE that controlled whether `--release` is passed to cargo during the build, and a CFG_ENABLE_OPTIMIZE that controlled where `make install` (among others) looked for the already built cargo executable. Unfortunately, if none of these were specified, `make all` built a release cargo but `make install` looked for it under `$(CFG_TARGET)/debug` (and aborted with "Please run `make` first"). This patch keeps CFG_DISABLE_OPTIMIZE only and uses it consistently. --- Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index db8ccb65f..b9f98755f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -59,10 +59,10 @@ BIN_TARGETS := $(BIN_TARGETS:src/bin/%.rs=%) BIN_TARGETS := $(filter-out cargo,$(BIN_TARGETS)) define DIST_TARGET -ifdef CFG_ENABLE_OPTIMIZE -TARGET_$(1) = $$(TARGET_ROOT)/$(1)/release -else +ifdef CFG_DISABLE_OPTIMIZE TARGET_$(1) = $$(TARGET_ROOT)/$(1)/debug +else +TARGET_$(1) = $$(TARGET_ROOT)/$(1)/release endif DISTDIR_$(1) = $$(TARGET_$(1))/dist IMGDIR_$(1) = $$(DISTDIR_$(1))/$$(PKG_NAME)-$(1)-image -- 2.30.2